import request from "@/utils/request";

/**
 * @function 获取列表数据
 * **/
export const listApi = (params) => {
  return request.get('/sys/role/page', {params})
}

/**
 * @function 创建角色
 * **/
export const createApi = (data) => {
  return request.post('/sys/role', data)
}

/**
 * @function 获取角色详情
 * **/
export const getInfoApi = (id) => {
  return request.get(`/sys/role/${id}`)
}

/**
 * @function 更新角色
 * **/
export const updataApi = (data) => {
  return request.put('/sys/role', data)
}

/**
 * @function 删除角色
 * **/
export const deleteApi = (ids) => {
  return request.delete('/sys/role', {data:ids})
}

/**
 * @function 获取角色下拉列表
 * **/
export const roleSelectApi = () => {
  return request.get('/sys/role/list')
}